{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "3952d094",
   "metadata": {},
   "source": [
    "# Transmon Analytics"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "cc0856a2",
   "metadata": {},
   "source": [
    "This demo notebook demonstrates how to use the transmon_analytics.py file to create plots of the transmon qubit Cooper pair box eigenvalues as a function of offset charge (ng). These plots can be found the original transmon qubit paper (J. Kock et al., Phys. Rev. A 76, 042319 (2007).) Here we consider the first four energy levels (m=0 through m=3) as a function of offset charge for the case where the ratio of Josephson to charing energy is equal to one ($E_{J} / E_{C} = 1.0$.)   "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "cubic-sunset",
   "metadata": {},
   "outputs": [],
   "source": [
    "import qiskit_metal as metal \n",
    "from qiskit_metal.analyses.hamiltonian.transmon_analytics import *"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "6caf056d",
   "metadata": {},
   "source": [
    "The function which actually creates the plots is called \"plot_eigenvalues\" and it does not take any arguments. So, we can create the plot(s) simply by executing the following command:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "b5874915",
   "metadata": {},
   "outputs": [],
   "source": [
    "plot_eigenvalues() "
   ]
  },
  {
   "cell_type": "markdown",
   "id": "745bf3f1",
   "metadata": {},
   "source": [
    "The plots can be made for higher energy levels and/or for different ratios of $E_{J}/E_{C}$ by directly modifying those parameters in the file transmon_analytics.py "
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
